<template>

  <div class="problem">
    
    <ul class="problem_main">
      <li class="flex" v-for="item in list" @click="toProblemDetail(item.id)">
        <div class="problem_left">
          <i class="iconfont icon-weibiaoti-"></i>
          {{item.title}}
        </div>
        <i class="iconfont icon-arrowright"></i>
      </li>
    </ul>
    

  </div>

</template>


<script>
export default {
  name: 'problem',
  data () {
    return {
      list: [
        {
          id: 0,
          title: '客户订单取消政策',
        },      
        {
          id: 1,
          title: '什么是余额？',
        },
        {
          id: 2,
          title: '充值限额',
        },
        {
          id: 3,
          title: '提现限额',
        },
      ],
    }
  },
  mounted(){
    this.$root.share();
  },
  methods: {
    toProblemDetail(listId){
      if (listId == 0) {
        this.$router.push({path:'/policy'})
      } else {
        this.$router.push({
          name: 'problemDetail',
          params: {
            id: listId
          }
        })        
      }

    }
  }
}
</script>

<style scoped>
  .problem{

  }
  .problem_main{
    
  }
  .problem_main li{
    border-bottom: 1px solid #B3B3B4;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0.5rem;
  }
  .icon-weibiaoti-{
    background-color: #31BCAD;
    color: #fff;
    border-radius: 5px;
    padding: 2px;
  }
  .icon-arrowright{

  }
</style>
<style>
  ul,li,div,a,p,span{
    margin: 0;
    padding: 0;
  }
  li{
    list-style: none;
  }
  .flex{
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
  }
</style>
